package com.chanyachting.emall.action.applicationLeter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.domain.Applicationleter;
import com.chanyachting.emall.form.ApplicationleterForm;
import com.chanyachting.emall.service.ApplicationLeterService;
import com.chanyachting.emall.serviceImpl.ApplicationLeterServiceImpl;

public class DelReleaseAction extends Action {
	
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		ApplicationleterForm alForm=(ApplicationleterForm)form;
		
		ApplicationLeterService alservice=new ApplicationLeterServiceImpl();
		
		Applicationleter al=new Applicationleter();
		
		BeanUtils.copyProperties(al, alForm);
		
		//执行数据库操作
		alservice.delReleaseApplicationleter(al);
		
		return mapping.findForward("releaseList");
	}

}
